package org.jash.mvp2206.user;

import org.jash.mvp2206.entity.CheckCode;
import org.jash.mvp2206.entity.LoginEntity;
import org.jash.mvp2206.entity.RegisterEntity;
import org.jash.mvp2206.entity.VerifyCode;

import java.util.Map;

import io.reactivex.rxjava3.core.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public final class Construct {
    public interface ILoginModel {
        Observable<LoginEntity> login(String username, String password);
    }

    public interface ILoginPresenter {
        void login(String username, String password);
    }

    public interface ILoginView {
        void loginSuccess(String token);
        void loginFailure(Throwable t);
    }

    public interface IRegisterModel {
        Observable<VerifyCode> getVerifyCode(String phone);
        Observable<CheckCode> checkCode(String phone, String code);
        Observable<RegisterEntity> register(String username, String password, String phone);
    }
    public interface IRegisterPresenter {
        void getVerifyCode(String phone);
        void checkCode(String phone, String code);
        void register(String username, String password, String phone);
    }
    public interface IRegisterView {
        void codeSuccess(int code);
        void checkedSuccess(String msg);
        void registerSuccess(String msg);
        void failure(Throwable t);
    }
}
